3 Workings

This chapter describes what SimpleWave does when is starts running. Because it is a background-only application (known to the Finder as an “extension”) it starts running automatically when the client computers start up. This documentation assumes you are (still) using the default preferences. The next chapter will describe how to customize SimpleWave's behavior.

First, SimpleWave checks for the necessary system software components it needs to operate. If the system software doesn't have all needed components this message appears:

“The current system software is not sufficient to run SimpleWave.
Please contact your administrator.”

This message and all others listed below will time-out after approximately thirty seconds and disappear. The messages which end with the request to contact the administrator can be made to include the room or phone number where the administrator can be reached. The next chapter (Installation) will tell you how to do this.

When SimpleWave is configured to check the sound volume level and monitor depth, these are checked first. If the current settings don't match the preferred ones, SimpleWave sets the sound volume level and monitor depth as defined by the administrator.

Then, if the volume containing the master folder is not already mounted SimpleWave mounts it with the username and password specified in the locations resource in the SimpleWave extension. If this fails because the server is not up or because the access-privileges don't allow it to be mounted, then SimpleWave quits after displaying the following warning message:

The disk “X” is maintained automatically. You should not save documents on this disk because they will be removed automatically!

SimpleWave will then retry the next time it runs. The same message is displayed when SimpleWave is set to check the startup disk once a day, and it decides that no check is needed for this startup.

When the server volume has been succesfully mounted the following message will be displayed:

While you are working I will make sure the disk “X” contains the proper software. Please accept my apologies for any delays. And save your documents to floppy disk, because they will be removed automatically!

(The text above may be different when your destination path is to a folder instead of a disk or when SimpleWave is configured to use the Skip folder.)

Then, if necessary, the startup volume name will be changed to the name specified in the Destination Path field of the locations resource.

SimpleWave then looks for a file on the server volume and opens it. This will cause the server volume to have a busy file which prevents the user from unmounting it. Using this method is very safe because it doesn't require a patch to the system. When SimpleWave is finished and is ready to unmount the server volume it closes this file first.

Next SimpleWave looks for the paths and names set with the locations resource. If they are not found the following message will be shown:

“An error occurred when SimpleWave tried to find the folders it needs.
Please contact your administrator.” 

After that the name of the active system folder will be changed (if you specified a name in the locations resource) and the active system folder will be moved to the first level where SimpleWave starts comparing. Usually this is also the first level of the harddisk. Also, SimpleWave will delete the files and folders on the startup disk which are currently in the trash. After that, if there is a PrintMonitor Documents folder inside the System Folder, its contents will be deleted if this option is enabled in the preferences resource.

Then the Skip Folder is checked for files which have been in this folder for more than the preset delay time (in days). If the Skip Folder path isn't empty (folders are created if non-existent) and the Skip Folder delay is a positive value, then SimpleWave deletes every file which is older than the preset delay time. If the folder ends up empty, it is deleted also.

In addition SimpleWave can check the total size of the Skip Folder and delete the oldest files when this size exceeds a set maximum. This is repeated until the Skip Folder size is below the maximum size. 

In all cases, the files SimpleWave decides to delete, are deleted regardless of whether or not they are locked.

The next step in the operation of SimpleWave is to make space for files being copied from the server onto the startup disk. First all files and folders are removed which are present on the startup disk but not in the master folder (except the Skip Folder). If a file is in use, it will be moved to the trash, otherwise it is deleted immediately. However, f the access privileges to a folder on the server don't allow SimpleWave to see which files or folders are present, then the folder on the startup disk is not touched. That folder is checked the next time when the access privileges are normal again, but it allows the administrator to lock a folder on the server, add or remove files and make the folder available again without deleting files and folders on the startup disk. An alternative is to simply disable login access for the “SimpleWave” user when no-one is logged in.
As an additional precaution, the system folder will not be removed from the Startup disk, even if the system folder inside the master folder is accidently removed or renamed.

After checking for and removing all “illegal” files and folders, SimpleWave starts to compare files and folders in the master folder with their counterparts on the startup disk in order to replace whatever is missing or otherwise wrong. The positions of windows and icons are set to the positions seen in the master folder.
A file on the startup disk is replaced by a fresh copy from the master folder when:
• it is not present on the startup disk at all;
• the document kind is different;
• the application which created the two files is different;
• the creation date is different;
• the modification date of the file in the master folder is later than the file on the startup disk.
• sizes are different;
• it isn't an invisible file. 
The modification date comparison is done this way because some extensions, but most importantly the system file, change their modification date for only small changes -- usually too small to justify a fresh copy from the master folder. SimpleWave makes two exceptions to this: files in the preferences folder and files which contain the custom icon for folders. With these, the file is updated when the modification dates are different;

A folder is created on the startup disk when:
• it is present in the master folder but not present on the startup disk;
• the folder in the master folder isn't a special invisible folder maintained by the system. 

Note that when a file on the master folder has the same name as a folder on the startup disk (or a folder has the same name as a file), the folder is replaced by the file (or the file is replaced by the folder). An alias isn't treated any differently unless it is marked by a label. See the “Advanced Installation” chapter for more information on using labels.

If a file on the file-server is marked “copy protected” and the file needs do be installed on the startup disk, SimpleWave puts up an alert with the following message:

The file “X” needs to be installed on the disk “Y” but I am not allowed to copy it from the server.
Please contact your administrator.

Or when the file is already present on the startup disk but is different from the one in the master folder and SimpleWave wants to update it:

The file “X” needs to be replaced by a new version but I am not allowed to copy it from the server.
Please contact your administrator.

Note: You can allow SimpleWave to copy “copy protected” files by enabling the “Ignore Copy-Prot. For Install” option in the preference resource as described later in this manual.

Replacing or creating files and folders takes place in the background. The user should notice only a minor slowdown depending on the type of computer and network used. New files are copied to a temporary place first. If the replacement is successful, the old file is removed (or moved to the trash if the file is busy) and replaced by the fresh copy.

If the system file is replaced, the Macintosh name (as set with the Sharing Setup control panel) is copied from the old system file into the new one.
When it isn't necessary to copy a file, the position of its icon in the window is reset. For folders the icon position, window size and view is reset. These changes may not be used immediately by the Finder.

When SimpleWave finds the startup disk is full (even after checking the Skip Folder again) and it can't update or create a file, the following message will be shown the first five times SimpleWave fails to copy a file:

The file “X” can not be copied because the disk “Y” is full.
Please contact your administrator.

If more than five files failed to be copied, then when SimpleWave is finished checking the disk the following message will appear:

N files couldn't be copied onto the disk “Y” because there is not enough diskspace.
Please contact your administrator.

When all the updating is finished, the user may be presented with this message if you have set the preferences to force a restart:

While checking the disk “X” I had to change the system software. This requires me to restart this computer. Sorry!

If SimpleWave mounted the remote disk with the master folder, it also unmounts it. It will also unmount any other disk of the same file-server, which has been mounted by the user after SimpleWave connected to the file-server.

When a restart is not forced the following message is displayed:

While checking the disk “X” I had to change the system software. Please restart this computer when possible.

This message appears only when a file was added or replaced in the System Folder, Control Panels folder, Extensions folder or Control Strip folder. If a restart is forced upon the user, SimpleWave then asks the Finder to restart the computer and to give the user the opportunity to save documents.

To summarize all this, SimpleWave:
• connects to file-server;
• prevents user from disconnecting from server;
• renames startup disk to default (optional);
• renames active system folder to default (optional);
• empties trash from startup disk only (optional)
• empties PrintMonitor Documents Folder (optional on first run only)
• deletes contents of Skip Folder periodically (optional);
• deletes files from startup disk when not on file-server;
• copies files from file-server when not on the startup disk;
• copies files from file-server when newer than on the startup disk;
• If a file is an alias, the alias is remapped to the equivalent file/folder on the startup disk, or the original is copied instead, depending on the Label assigned to the alias;
• restores Macintosh name when replacing the system file;
• disconnects from server;
• restarts client computer if needed (optional).

SimpleWave supports several languages for the displayed messages and uses the same language as the system software when the required translation is available. Otherwise it uses the English text. The message examples in this documentation are in English but may appear in another language on screen. SimpleWave currently supports these languages:

• Dutch;
• English.